package com.yp.loading.widget;

import android.app.Dialog;
import android.view.View;

import com.yp.loading.interfaces.ILoadingView;
import com.yp.loading.R;
import com.yp.loading.base.BaseDialog;

/**
 * Created by tjy on 2017/6/19.
 */
public class LoadingDialog extends BaseDialog implements ILoadingView {

    @Override
    public boolean isCancelable() {
        return false;
    }

    @Override
    protected boolean isCancelOutside() {
        return false;
    }

    @Override
    protected int setLayoutId() {
        return R.layout.dialog_loading;
    }

    @Override
    public void showLoadingView() {
        Dialog mDialog = this.getDialog();
        if (mDialog != null) {
            mDialog.show();
        }
    }

    @Override
    public void hideLoadingView() {
        Dialog mDialog = this.getDialog();
        if (mDialog != null) {
            mDialog.dismiss();
        }
    }

    @Override
    public void onClick(View v) {

    }
}
